//
//  BeautifulDetailViewController.m
//  Dsgfds
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 胡泉. All rights reserved.
//

#import "BeautifulDetailViewController.h"
#import "UMSocial.h"
@interface BeautifulDetailViewController ()<UMSocialUIDelegate>
@property (nonatomic, strong) UIWebView *webView;
@end

@implementation BeautifulDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"share1"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]style:(UIBarButtonItemStylePlain) target:self action:@selector(shareToOtherAPP)];
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.yueduziji.com/v/%@",_model.contentid]]]];
    [self.view addSubview:_webView];
    // Do any additional setup after loading the view.
}

- (void)shareToOtherAPP
{
    // 在设置QQ 微信 appID时设置
//    [UMSocialConfig hiddenNotInstallPlatforms:@[UMShareToSina,UMShareToRenren,UMShareToDouban]];
    [UMSocialSnsService presentSnsIconSheetView:self
    appKey:@"561c5f76e0f55ab642001b90"shareText:@""
    shareImage:[UIImage imageNamed:@"icon.png"]
    shareToSnsNames:[NSArray arrayWithObjects:UMShareToSina,UMShareToTencent,UMShareToRenren,UMShareToDouban,UMShareToWechatTimeline,nil] delegate:self];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
